From 400e909c18c1dfd4e63be589bfcd13f118b2dc3d Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 7 Aug 2020 23:36:53 +0200 Subject: [PATCH] Port to qmake --- debian/clean | 2 -- debian/control | 1 + debian/gpsbabel.install | 2 +- debian/patches/htmldoc-location | 27 +++++++++++++++++++-------- debian/rules | 10 +++------- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/debian/clean b/debian/clean index cdd0b9948..fb2fb86a7 100644 --- a/debian/clean +++ b/debian/clean @@ -1,4 +1,2 @@ -debian/doctmp/ -debian/doctmpcapabilities.inc debian/gpsbabel.1 debian/gpsbabel.xpm diff --git a/debian/control b/debian/control index dc0879352..cfed13da2 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: optional Maintainer: Debian GPS team Uploaders: Bernd Zeimetz , Jochen Sprickerhof Build-Depends: debhelper-compat (= 13), + qt5-qmake, pkg-config, libexpat1-dev, expat, libxml2-utils, diff --git a/debian/gpsbabel.install b/debian/gpsbabel.install index 9e0436b2e..b8a5e6e66 100644 --- a/debian/gpsbabel.install +++ b/debian/gpsbabel.install @@ -1 +1 @@ -usr/bin/gpsbabel +gpsbabel usr/bin diff --git a/debian/patches/htmldoc-location b/debian/patches/htmldoc-location index 2ff47e9c7..fcc1eb29f 100644 --- a/debian/patches/htmldoc-location +++ b/debian/patches/htmldoc-location @@ -1,12 +1,23 @@ ---- a/gbversion.h.in -+++ b/gbversion.h.in +--- a/gbversion.h.qmake.in ++++ b/gbversion.h.qmake.in @@ -14,5 +14,5 @@ #else - #define VERSION "@GB.MAJOR@.@GB.MINOR@.@GB.MICRO@@GB.PACKAGE_RELEASE@" - constexpr char kVersionSHA[] = "@GB.SHA@"; --#define WEB_DOC_DIR "https://www.gpsbabel.org/htmldoc-@DOCVERSION@" -+#define WEB_DOC_DIR "file:///usr/share/doc/gpsbabel/gpsbabel.html" + #define VERSION \"$${GB.MAJOR}.$${GB.MINOR}.$${GB.MICRO}$${GB.PACKAGE_RELEASE}\" + constexpr char kVersionSHA[] = \"$${GB.SHA}\"; +-#define WEB_DOC_DIR \"https://www.gpsbabel.org/htmldoc-$${DOCVERSION}\" ++#define WEB_DOC_DIR \"file:///usr/share/doc/gpsbabel\" #endif +--- a/gui/mainwindow.cc ++++ b/gui/mainwindow.cc +@@ -1156,7 +1156,7 @@ void MainWindow::preferencesActionX() + //------------------------------------------------------------------------ + void MainWindow::helpActionX() + { +- ShowHelp("index.html"); ++ ShowHelp("gpsbabel.html"); + } + //------------------------------------------------------------------------ + void MainWindow::filtersClicked() --- a/testo.d/serialization.test +++ b/testo.d/serialization.test @@ -7,7 +7,7 @@ @@ -14,7 +25,7 @@ # We do a compare_nole as specific whitespace is part of deserialization. gpsbabel -^3 > ${TMPDIR}/format3.txt -sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt -+sed 's,file:///usr/share/doc/gpsbabel/gpsbabel.html/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt ++sed 's,file:///usr/share/doc/gpsbabel/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt compare_nole ${REFERENCE}/format3.txt ${TMPDIR}/format3.fiddled.txt gpsbabel -^2 > ${TMPDIR}/format2.txt compare_nole ${REFERENCE}/format2.txt ${TMPDIR}/format2.txt @@ -23,7 +34,7 @@ compare_nole ${REFERENCE}/format0.txt ${TMPDIR}/format0.txt gpsbabel -%1 > ${TMPDIR}/filter1.txt -sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt -+sed 's,file:///usr/share/doc/gpsbabel/gpsbabel.html/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt ++sed 's,file:///usr/share/doc/gpsbabel/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt compare_nole ${REFERENCE}/filter1.txt ${TMPDIR}/filter1.fiddled.txt gpsbabel -%0 > ${TMPDIR}/filter0.txt compare_nole ${REFERENCE}/filter0.txt ${TMPDIR}/filter0.txt diff --git a/debian/rules b/debian/rules index d896a5458..b2025098e 100755 --- a/debian/rules +++ b/debian/rules @@ -3,13 +3,11 @@ export QT_SELECT := qt5 %: - dh $@ + dh $@ --buildsystem=qmake export DEB_BUILD_MAINT_OPTIONS = hardening=+all # tests depending on a TZ with a small offset export TZ='/usr/share/zoneinfo/Etc/GMT' -DOCTEMP = $(CURDIR)/debian/doctmp -include /usr/share/dpkg/pkg-info.mk # Extended precision on i386 results in weird bugs, so we build # with -ffloat-store. @@ -19,9 +17,7 @@ endif override_dh_auto_configure: dh_auto_configure -- \ - --with-zlib=system \ - --with-doc=$(DOCTEMP) \ - --prefix=/usr + WITH_LIBUSB=pkgconfig WITH_SHAPELIB=pkgconfig WITH_ZLIB=pkgconfig convert -resize 32x32 gui/images/appicon.png debian/gpsbabel.xpm xsltproc --output debian/gpsbabel.1 /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl xmldoc/gpsbabel_man.xml @@ -30,5 +26,5 @@ override_dh_auto_build-arch: if dpkg -s qtwebengine5-dev; then $(MAKE) gui; fi override_dh_auto_build-indep: - $(MAKE) doc + $(MAKE) gpsbabel.pdf $(MAKE) gpsbabel.html -- 2.30.2